#include <iostream>
using namespace std;

class Complex
{
    private:
        int a,b;
    public:
        void setData(int x, int y)
        {
            a = x; b = y;
        }
        friend void fun(Complex);
};

void fun(Complex c)
{
    cout << "a+b=" << c.a + c.b;
}

int main()
{
    Complex c1, c2, c3;
    c1.setData(5,6);
    fun(c1);
}